/* Markdown 样式 */
.markdown-content {
  line-height: 1.6;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4, .markdown-content h5, .markdown-content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-content h1 {
  font-size: 1.8rem;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3rem;
}

.markdown-content h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3rem;
}

.markdown-content h3 {
  font-size: 1.25rem;
}

.markdown-content p {
  margin-bottom: 1rem;
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.markdown-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.markdown-content li {
  margin-bottom: 0.25rem;
  list-style-position: outside;
}

/* 嵌套列表样式 */
.markdown-content ul ul {
  list-style-type: circle;
  padding-left: 1.5rem;
}

.markdown-content ul ul ul {
  list-style-type: square;
  padding-left: 1.5rem;
}

.markdown-content ol ol {
  list-style-type: lower-alpha;
  padding-left: 1.5rem;
}

.markdown-content ol ol ol {
  list-style-type: lower-roman;
  padding-left: 1.5rem;
}

.markdown-content ol ul,
.markdown-content ul ol {
  padding-left: 1.5rem;
}

.markdown-content a {
  color: #0366d6;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

.markdown-content code {
  font-family: monospace !important;
  background-color: #f6f8fa;
  border-radius: 3px;
  padding: 0.2em 0.4em;
  font-size: 85%;
}

.markdown-content pre {
  background-color: #f6f8fa;
  border-radius: 3px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
  /* font-family: monospace !important; */
}

.markdown-content blockquote {
  border-left: 4px solid #dfe2e5;
  padding-left: 1rem;
  color: #6a737d;
  margin-bottom: 1rem;
}

.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1rem;
}

.markdown-content th, .markdown-content td {
  border: 1px solid #dfe2e5;
  padding: 0.5rem 0.75rem;
}

.markdown-content th {
  background-color: #f6f8fa;
  font-weight: 600;
}

/* 预览区域的Markdown简化样式 */
.markdown-preview {
  line-height: 1.5;
}

.markdown-preview h1, .markdown-preview h2, .markdown-preview h3 {
  font-size: 1em;
  font-weight: 600;
  margin: 0.25em 0;
  border-bottom: none;
  display: inline;
}

.markdown-preview p {
  margin: 0.25em 0;
}

.markdown-preview ul, .markdown-preview ol {
  padding-left: 1em;
  margin: 0.25em 0;
}

.markdown-preview li {
  margin-bottom: 0.1em;
}

.markdown-preview blockquote {
  border-left: 3px solid #dfe2e5;
  padding-left: 0.5em;
  margin: 0.25em 0;
  font-size: 0.9em;
}

.markdown-preview code {
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  font-family: monospace;
}

/* KaTeX公式样式 */
.katex-block {
  overflow-x: auto;
  margin: 1em 0;
  padding: 0.5em 0;
}

/* 确保公式在不同区域正确显示 */
.markdown-content .katex, 
.markdown-preview .katex {
  font-size: 1.1em;
}

.markdown-content .katex-display, 
.markdown-preview .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5em 0;
}